package com.share.design.composite.tree;

/**
 * @author caifan
 * @since 2022/10/30
 */
public class Client {
    public static void main(String[] args) {
        AbstractNode rootNode = new Node();
        rootNode.setId(1);
        rootNode.setParentId(0);
        AbstractNode node1 = new Node();
        node1.add(new Leaf());
        node1.add(new Leaf());
        rootNode.add(new Leaf());
        rootNode.add(new Leaf());
        rootNode.add(node1);

        System.out.println(node1.getId());
    }
}
